const path = require("path")
const HtmlWebpackPlugin = require("html-webpack-plugin")

module.exports = {
    mode:"development",
    entry:"./src/index.js",
    output:{
        path:path.resolve(__dirname,"dist"),
        filename:"bundle.js"
    },
    module: {
        // rules:[
        //     {
        //         test: /\.js$/,
        //         loader: 'babel-loader',
        //         exclude: /node_modules/,
        //     }
        // ]
    },
    plugins:[
        new HtmlWebpackPlugin({
            template:"public/index.html",
            title:"合图小工具",
            filename:"index.html"
        })
    ],
    resolve:{
        
    },
    devServer:{
        host:"localhost",
        port:3000
    }
}